<script type="text/javascript">
	function requestSiteChange() {
		$('#request-table').datagrid({
			url : 'app/request'
		});
		$('#request-table').datagrid('load', {
			siteId : $('input[name="site-id"]').val()
		});
	}
</script>
<div id="request-tb" style="padding: 5px; height: auto">
	<div style="margin-bottom: 5px">
	<input class="easyui-combobox" name="site-id"
			data-options="valueField:'id',textField:'name',url:'app/request',onSelect:requestSiteChange">
		<a href="#" class="easyui-linkbutton" iconCls="icon-add"
			onclick="onAdd('request')">新增</a>
	</div>
</div>
<table id="request-table" class="easyui-datagrid"
	data-options="rownumbers:true,singleSelect:true,fitColumns:true,pagination:true,pageSize:10,toolbar:'#request-tb',loadFilter:pagerFilter,url:'app/request'">
	<thead>
		<tr>
			<th data-options="field:'name',width:50">名称</th>
			<th data-options="field:'url',width:100">URL</th>
			<th data-options="field:'type',width:50">类型</th>
			<th data-options="field:'header',width:50">请求头</th>
			<th data-options="field:'body',width:50">请求体</th>
			<th
				data-options="field:'id',formatter:requestBtn,width:50,align:'center'">操作</th>
		</tr>
	</thead>
</table>

